<?php 
	function user_exists($user, $enc_pass, $link){
		$query = "SELECT username, password FROM client WHERE username='$user' AND password='$enc_pass'";
		$result = mysqli_query($link, $query) or die("Failed to retrieve user" . mysqli_error($link));
		mysqli_close($link);
		if (mysqli_num_rows($result) > 0){
			return true;
		}
		else {
			return false;
		}
	}

?>